package p270jp.pxv.android.view;

import android.content.Context;
import android.graphics.PointF;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
import java.util.List;
import p060c2.Chain;
import p270jp.pxv.android.R;
import p325m0.MutabilityOwnership;

/* compiled from: GiftingAnimationView.kt */
/* renamed from: jp.pxv.android.view.GiftingAnimationView */
/* loaded from: classes2.dex */
public final class GiftingAnimationView extends FrameLayout {

    /* renamed from: d */
    public static final /* synthetic */ int f19522d = 0;

    /* renamed from: a */
    public final int f19523a;

    /* renamed from: b */
    public final int f19524b;

    /* renamed from: c */
    public final List<List<PointF>> f19525c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public GiftingAnimationView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        MutabilityOwnership.m3745m(context, "context");
        int dimensionPixelOffset = getResources().getDimensionPixelOffset(R.dimen.gifting_width);
        this.f19523a = dimensionPixelOffset;
        int dimensionPixelOffset2 = getResources().getDimensionPixelOffset(R.dimen.gifting_height);
        this.f19524b = dimensionPixelOffset2;
        this.f19525c = Chain.m9925y(Chain.m9926x(new PointF(0.0f, 0.0f)), Chain.m9925y(new PointF(((float) (-dimensionPixelOffset)) * 0.8f, 0.0f), new PointF(((float) dimensionPixelOffset) * 0.8f, 0.0f)), Chain.m9925y(new PointF(((float) (-dimensionPixelOffset)) * 0.8f, ((float) (-dimensionPixelOffset2)) * 0.6f), new PointF(0.0f, ((float) dimensionPixelOffset2) * 0.6f), new PointF(((float) dimensionPixelOffset) * 0.8f, ((float) (-dimensionPixelOffset2)) * 0.6f)), Chain.m9925y(new PointF(((float) (-dimensionPixelOffset)) * 0.8f, ((float) (-dimensionPixelOffset2)) * 0.72f), new PointF(((float) (-dimensionPixelOffset)) * 0.8f, ((float) dimensionPixelOffset2) * 0.72f), new PointF(((float) dimensionPixelOffset) * 0.8f, ((float) (-dimensionPixelOffset2)) * 0.72f), new PointF(((float) dimensionPixelOffset) * 0.8f, ((float) dimensionPixelOffset2) * 0.72f)), Chain.m9925y(new PointF(((float) (-dimensionPixelOffset)) * 1.6f, ((float) (-dimensionPixelOffset2)) * 0.66f), new PointF(((float) (-dimensionPixelOffset)) * 0.8f, ((float) dimensionPixelOffset2) * 0.66f), new PointF(0.0f, ((float) (-dimensionPixelOffset2)) * 0.66f), new PointF(((float) dimensionPixelOffset) * 0.8f, ((float) dimensionPixelOffset2) * 0.66f), new PointF(((float) dimensionPixelOffset) * 1.6f, ((float) (-dimensionPixelOffset2)) * 0.66f)));
    }

    @Override // android.view.View, android.view.ViewGroup
    public void onDetachedFromWindow() {
        ViewPropertyAnimator animate;
        int childCount = getChildCount();
        if (childCount > 0) {
            int i = 0;
            while (true) {
                int i2 = i + 1;
                View childAt = getChildAt(i);
                if (!(childAt == null || (animate = childAt.animate()) == null)) {
                    animate.cancel();
                }
                if (i2 >= childCount) {
                    break;
                }
                i = i2;
            }
        }
        super.onDetachedFromWindow();
    }
}
